ChangeBars-LinkIndicators column?

I see that Change Bars and Link Indicators apply only to the Main column. That's a drag for non-spec like modules that don't have a Main column.

In Feb jsarkic was kind enough to provide an example of a DXL column showing the change bars. See below after I tweaked it.

Can this be enhanced into a column showing link indicators that actually work? That is, hover the mouse and see the link, click to follow to the linked object.
 

  • Louie
// InsertChangeBarColumn.dxl
/*
Inserts a thin column mimicking the 'Change Bars' color of the Main column.
Select a column, run this from the DXL Window
*/
string DXL_Code = "
    // Display change bars in this column
        DBE can = getCanvas()
        if (unsaved obj)
             realBackground(can, realColor_Red)         // Change not yet saves
        elseif (modified obj)
             realBackground(can, realColor_Yellow)      // modified since Baseline
        else realBackground(can, realColor_Blue)                // not modified since baseline
"  // end string DXL_Code
 
Column cCurr = column(getSelectedCol(current Module))
Column cNew = insert(cCurr)
 
dxl(cNew, DXL_Code)
width(cNew, 6)   // Best width seems to be '6', I guess Pixels
 
//      ---- end file InsertChangeBarColumn.dxl ----

llandale - Mon Mar 22 17:29:07 EDT 2010

Re: ChangeBars-LinkIndicators column?
Mathias Mamsch - Tue Mar 23 18:11:59 EDT 2010

I am not aware of any possibility to interact with a DXL column (except the dxl layout column reacting on the currently selected object). Therefore it would be hard to impossible to reprogram the link indicators. However you could just put a main column very small in there. If you make it very small the heading numbers won't be displayed. Regards, Mathias
 

// InsertChangeBarColumn.dxl
/*
Inserts a thin column mimicking the 'Change Bars' color of the Main column.
Select a column, run this from the DXL Window
*/
string DXL_Code = "
    // Display change bars in this column
        DBE can = getCanvas()
        if (unsaved obj)
             realBackground(can, realColor_Red)         // Change not yet saves
        elseif (modified obj)
             realBackground(can, realColor_Yellow)      // modified since Baseline
        else realBackground(can, realColor_Blue)                // not modified since baseline
"  // end string DXL_Code
 
if (null getSelectedCol(current Module)) {
        ack "Select a column"
        halt
}
 
Column cCurr = column getSelectedCol(current Module)
Column cNew2 = insert cCurr
 
width(cNew2, 3)
title (cNew2, " ")
main cNew2
 
Column cNew = insert(cNew2)
dxl(cNew, DXL_Code)
width(cNew, 6)   // Best width seems to be '6', I guess Pixels
 
showChangeBars false
linkIndicators true 
 
//      ---- end file InsertChangeBarColumn.dxl ----

Re: ChangeBars-LinkIndicators column?
llandale - Wed Mar 24 11:07:39 EDT 2010

Mathias Mamsch - Tue Mar 23 18:11:59 EDT 2010

I am not aware of any possibility to interact with a DXL column (except the dxl layout column reacting on the currently selected object). Therefore it would be hard to impossible to reprogram the link indicators. However you could just put a main column very small in there. If you make it very small the heading numbers won't be displayed. Regards, Mathias
 

// InsertChangeBarColumn.dxl
/*
Inserts a thin column mimicking the 'Change Bars' color of the Main column.
Select a column, run this from the DXL Window
*/
string DXL_Code = "
    // Display change bars in this column
        DBE can = getCanvas()
        if (unsaved obj)
             realBackground(can, realColor_Red)         // Change not yet saves
        elseif (modified obj)
             realBackground(can, realColor_Yellow)      // modified since Baseline
        else realBackground(can, realColor_Blue)                // not modified since baseline
"  // end string DXL_Code
 
if (null getSelectedCol(current Module)) {
        ack "Select a column"
        halt
}
 
Column cCurr = column getSelectedCol(current Module)
Column cNew2 = insert cCurr
 
width(cNew2, 3)
title (cNew2, " ")
main cNew2
 
Column cNew = insert(cNew2)
dxl(cNew, DXL_Code)
width(cNew, 6)   // Best width seems to be '6', I guess Pixels
 
showChangeBars false
linkIndicators true 
 
//      ---- end file InsertChangeBarColumn.dxl ----

Well, it turns out this module has in fact Object Heading, but the main 'text' is an attr-DXL summarizing the important attributes. I enhanced that attr-DXL to display the Object Number and Heading for Heading objects, otherwise do the Summary.

So I aleady have a 'Main' column looking attribute that I display. Displaying the real Main column won't work for me since if I make it narrow, it will be hopelessly long for actual Headings.

I'm tempted to have the attr-DXL also update the Object Text, but I think that would blossom out History. That would solve my problem as I'd then just display the Main column in all the Views.

  • Louie

Re: ChangeBars-LinkIndicators column?
C_Rubio - Mon Nov 01 16:29:21 EDT 2010

Hi All,

Has anyone had any luck with this?

To Louie's point I run into the same problem with the main column and headings(the width of the rows get to large when you squeeze down the Main Column). I was almost tempted to wipeout the headings and store/restore them for different views, but that is a PITA for larger modules.

Was hoping there was someway to reassign a Main Column as one that does (or does not) have headings, so that I can squeeze it down so as just to see the Link Indicators. So far I cannot find a way in DXL to just display the indicators.

Thanks for any suggestions!
CR

Re: ChangeBars-LinkIndicators column?
llandale - Mon Nov 01 18:11:07 EDT 2010

C_Rubio - Mon Nov 01 16:29:21 EDT 2010
Hi All,

Has anyone had any luck with this?

To Louie's point I run into the same problem with the main column and headings(the width of the rows get to large when you squeeze down the Main Column). I was almost tempted to wipeout the headings and store/restore them for different views, but that is a PITA for larger modules.

Was hoping there was someway to reassign a Main Column as one that does (or does not) have headings, so that I can squeeze it down so as just to see the Link Indicators. So far I cannot find a way in DXL to just display the indicators.

Thanks for any suggestions!
CR

Well, this is what I have so far.

<1> I need to resolve the problem of the DXL file reading itself as I cannot have it issue a direct readFile command like it currently does in line #55:
string c_NameFile = "c:/Doors-Stuff/DXL-Local/InProgress/ForGeneral/LO_InsertChangeBar.dxl

Any help on that would be GREATLY appreciated, and I'll give full credit when I code that capability.

<2>I also intend to upgrade it to provide the capability to only count links from a specific link module, so we can indeed just display one kind of link (the kind that view would care about).

Its pretty good so far and we are indeed using it.

  • Louie

Attachments

attachment_14548490_LO_InsertChangeBar.dxl

Re: ChangeBars-LinkIndicators column?
C_Rubio - Mon Nov 01 18:37:18 EDT 2010

llandale - Mon Nov 01 18:11:07 EDT 2010
Well, this is what I have so far.

<1> I need to resolve the problem of the DXL file reading itself as I cannot have it issue a direct readFile command like it currently does in line #55:
string c_NameFile = "c:/Doors-Stuff/DXL-Local/InProgress/ForGeneral/LO_InsertChangeBar.dxl

Any help on that would be GREATLY appreciated, and I'll give full credit when I code that capability.

<2>I also intend to upgrade it to provide the capability to only count links from a specific link module, so we can indeed just display one kind of link (the kind that view would care about).

Its pretty good so far and we are indeed using it.

  • Louie

Thanks for the response,

I just read the file (but haven't run it yet), but I guess I am confused. Why can't you just read the file? Bad Form? or is it because you need it to be globally accessible?

If the code is local to a module, then couldn't you just bury the relevant code in a module level text attribute? and parse it out using a module level trigger? (or even easier just have the view saved with the column)...

I will take a closer look and see if I can get the gist, as I'd like to give you a hand, since you were kind enough to send it. Anyway I'll try and get to this tonight or in the AM, and will get back to you soon!.

Regards,
CR

Re: ChangeBars-LinkIndicators column?
llandale - Mon Nov 01 19:06:45 EDT 2010

C_Rubio - Mon Nov 01 18:37:18 EDT 2010
Thanks for the response,

I just read the file (but haven't run it yet), but I guess I am confused. Why can't you just read the file? Bad Form? or is it because you need it to be globally accessible?

If the code is local to a module, then couldn't you just bury the relevant code in a module level text attribute? and parse it out using a module level trigger? (or even easier just have the view saved with the column)...

I will take a closer look and see if I can get the gist, as I'd like to give you a hand, since you were kind enough to send it. Anyway I'll try and get to this tonight or in the AM, and will get back to you soon!.

Regards,
CR

After using it the code is of course embedded in the column in the view; possibly more than one view. But deploying the code so it can be run (in order to get inserted into the view in the first place) is another story. Its bad form to hard code paths like this, and in any event with our large distributed system not everyone will have access to any spot on the network I may choose to put it, and hard code the address.

What I need is some mechanism for some code to read a copy of itself. This is surely available somewhere because DXL errors seem to know what line number they occur; well I want the code at that line number and indeed at all other line numbers.

I may have to resort to parsing the "addins" path, to search for the file, but gads that's tough and doesn't guarantee the correct results.

I have a similar issue with many of my self-deploying triggers; is sure is easier to code code rather than coding inside some string that has to be escaped.

  • Louie

Re: ChangeBars-LinkIndicators column?
Mathias Mamsch - Mon Nov 01 20:24:59 EDT 2010

llandale - Mon Nov 01 19:06:45 EDT 2010
After using it the code is of course embedded in the column in the view; possibly more than one view. But deploying the code so it can be run (in order to get inserted into the view in the first place) is another story. Its bad form to hard code paths like this, and in any event with our large distributed system not everyone will have access to any spot on the network I may choose to put it, and hard code the address.

What I need is some mechanism for some code to read a copy of itself. This is surely available somewhere because DXL errors seem to know what line number they occur; well I want the code at that line number and indeed at all other line numbers.

I may have to resort to parsing the "addins" path, to search for the file, but gads that's tough and doesn't guarantee the correct results.

I have a similar issue with many of my self-deploying triggers; is sure is easier to code code rather than coding inside some string that has to be escaped.

  • Louie

Hey Louie,

You can get the relative include path of the currently executing code as well as the line number by just looking at the traceback ( dxlHere() ). However that will not solve your problem for all main context executing code, like DXL Layout, triggers, etc.

I have found a way, of determining the DOORS clients commandline, which is the missing piece for coding a source code lookup function that will emulate the source lookup of DOORS to translate the relative path of an include to the absolute path of an include. But I am not sure that will solve your problem.

The problem is, in some cases there is really no file being executed, but the code comes from a string (may it be attribute DXL, or just code run over the runStr COM interface). Even worse, the DXL code will be translated to the DXL XTC VM machine code and be discarded by the parser, before the (translated) code is run. Therefore I don't think you will even have a chance to read the currently executing DXL (source) code using some black magic to fornicate with the DOORS client.

Just my two cents. Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: ChangeBars-LinkIndicators column?
C_Rubio - Tue Nov 02 09:39:35 EDT 2010

llandale - Mon Nov 01 19:06:45 EDT 2010
After using it the code is of course embedded in the column in the view; possibly more than one view. But deploying the code so it can be run (in order to get inserted into the view in the first place) is another story. Its bad form to hard code paths like this, and in any event with our large distributed system not everyone will have access to any spot on the network I may choose to put it, and hard code the address.

What I need is some mechanism for some code to read a copy of itself. This is surely available somewhere because DXL errors seem to know what line number they occur; well I want the code at that line number and indeed at all other line numbers.

I may have to resort to parsing the "addins" path, to search for the file, but gads that's tough and doesn't guarantee the correct results.

I have a similar issue with many of my self-deploying triggers; is sure is easier to code code rather than coding inside some string that has to be escaped.

  • Louie

Hi Again,
OK I understand what you did, and like what I see (very creative in manually creating the Link Arrows). Too bad we can't use the native DOORs indicators (that would make things so much easier). You mentioned:


But deploying the code so it can be run (in order to get inserted into the view in the first
place) is another story. Its bad form to hard code paths like this, and in any event with our large
distributed system not everyone will have access to any spot on the network I may choose to put it,
and hard code the address.

 

Is the server that hosts the DOORs DB globally accessible to all? What we do here, is create a global repository of all DXL's, and create a Drop Down menu for our users to access them. We set up the windows registry to point to the global repository Drop Down folder.

 

 

 

HKEY_LOCAL_MACHINE\SOFTWARE\Telelogic\DOORS\9.2\Config]
"defopenlinkmode"="READ_ONLY"
"defopenmode"="READ_ONLY"
"Addins"="\\\\your server\\your folder\\Doors\\Doors_DXLs\\Your_global_Menu"



That allows all users access to all DXLs, once they install the registry settings to their Windows environment. It also sets up some additional DOORs defaults that we instantiate corporate wide (Read Only settings).

In any case using this method you could place your DXL in the globally accessible repository, and voila all could see it (and run it).

Don't know if that can help you, but hope it does.
Regards
CR



 

 

Re: ChangeBars-LinkIndicators column?
llandale - Tue Nov 02 11:41:52 EDT 2010

Mathias Mamsch - Mon Nov 01 20:24:59 EDT 2010
Hey Louie,

You can get the relative include path of the currently executing code as well as the line number by just looking at the traceback ( dxlHere() ). However that will not solve your problem for all main context executing code, like DXL Layout, triggers, etc.

I have found a way, of determining the DOORS clients commandline, which is the missing piece for coding a source code lookup function that will emulate the source lookup of DOORS to translate the relative path of an include to the absolute path of an include. But I am not sure that will solve your problem.

The problem is, in some cases there is really no file being executed, but the code comes from a string (may it be attribute DXL, or just code run over the runStr COM interface). Even worse, the DXL code will be translated to the DXL XTC VM machine code and be discarded by the parser, before the (translated) code is run. Therefore I don't think you will even have a chance to read the currently executing DXL (source) code using some black magic to fornicate with the DOORS client.

Just my two cents. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

I'm pretty sure I could query getenv("DOORSADDINS") and getenv("DOORSPROJECTADDINS") to get the currently values which contain root paths worthy of searching. I wonder what a copy of the command line would do for me. And I wonder how to get that even if I don't see a purpose at this time.

Yet, even translated code will display the line number and variables involved when there is a run-time error, so to my ignorant mind it seems like the actual line itself is still available during run time.

Will check with IBM

  • Louie

Re: ChangeBars-LinkIndicators column?
dacapri - Tue Oct 29 10:30:41 EDT 2013

Hello guys,

I was reading the entire discussion and we get out of topic.

I'm looking for a solution to have the change-bar and link-indicators shown in a column different from the main one (object heading and object text).

Is there somebody with a working solution?

 

Thanks a lot in advance.

 

Regards,

Daniele

 

Re: ChangeBars-LinkIndicators column?
llandale - Tue Oct 29 14:54:17 EDT 2013

dacapri - Tue Oct 29 10:30:41 EDT 2013

Hello guys,

I was reading the entire discussion and we get out of topic.

I'm looking for a solution to have the change-bar and link-indicators shown in a column different from the main one (object heading and object text).

Is there somebody with a working solution?

 

Thanks a lot in advance.

 

Regards,

Daniele

 

I don't think we managed to modify an existing column (e.g. the "Object Identifier") with change bars and link indicators, but we did manage to add a (thin) layout colum showing them; although the links were static and you could not use them to traverse to the linked objects.

Re: ChangeBars-LinkIndicators column?
ChrisAnnal - Thu Jul 24 09:34:13 EDT 2014

llandale - Tue Oct 29 14:54:17 EDT 2013

I don't think we managed to modify an existing column (e.g. the "Object Identifier") with change bars and link indicators, but we did manage to add a (thin) layout colum showing them; although the links were static and you could not use them to traverse to the linked objects.

I just came across this discussion and wondered if another approach may be to write a for loop to go through the module and do the following:

If Object Heading is empty (there is nothing but an Object Number displayed),

Execute the "Edit-->In Place" function for Object Text.

Object Text = <spacebar>

Save changes.

This would effectively make the "Main" column usable like you wanted, without the Object Numbers being crunched on top of each other in the narrowed column. I'm thinking of the case where you have perhaps a module where the Object Heading is irrelevant, but there is still a desire to see the change bars and functional link indicators. This would at least make the existing column more user-friendly in those modules.

Re: ChangeBars-LinkIndicators column?
llandale - Thu Jul 24 14:32:56 EDT 2014

ChrisAnnal - Thu Jul 24 09:34:13 EDT 2014

I just came across this discussion and wondered if another approach may be to write a for loop to go through the module and do the following:

If Object Heading is empty (there is nothing but an Object Number displayed),

Execute the "Edit-->In Place" function for Object Text.

Object Text = <spacebar>

Save changes.

This would effectively make the "Main" column usable like you wanted, without the Object Numbers being crunched on top of each other in the narrowed column. I'm thinking of the case where you have perhaps a module where the Object Heading is irrelevant, but there is still a desire to see the change bars and functional link indicators. This would at least make the existing column more user-friendly in those modules.

Yes, I always found it curious that newly created or otherwise "empty" objects were deemed to be "headings" and go heading numering.  Very annoying. 

Re: ChangeBars-LinkIndicators column?
a8155058 - Thu Jul 24 15:27:30 EDT 2014

Hey, in DOORS 9.6 you can now display these columns in not main.

Check it out
http://softqa.wordpress.com/2014/06/06/doors-9-6-a-review/